import React, { useState, createContext } from 'react';
import Countr from './Demo4child'

const CountContext = createContext()
function App() {
    const [count, setCount] = useState(0)

    return (
        <div>
            <p>当前点击次数: {this.state.count}</p>
            <button onClick={() => { setCount + 1 }}>Click</button>
        <CountContext.Provider value={count}></CountContext.Provider>
        </div>

    )
}


export default App